<?php

//include 'myconfigs/db.php';

//if(   $_SERVER['REMOTE_ADDR'] != '64.38.240.97' ) {
if(   $_SERVER['REMOTE_ADDR'] != '' ) {
if (  isset($_POST['subscription_id']) && strlen($_POST['subscription_id']) >  3 ) {
	  
	  
if ($_POST['itemname'] == "Charter") {
$levelend = time()+31536000;
} else {
$levelend = time()+2592000;
}

echo $itemno = $_POST['itemno'];
echo $username = $_POST['username'];
/*$query = "UPDATE osdate_user SET level=".$itemno.", levelend=".$levelend." WHERE username = '".$username."'";


mysql_query($query);
*/
echo $payemail = $_POST['email'];
echo $payment_status = "Completed";
echo $subscription_id = $_POST['subscription_id'];
echo $invoiceid = $_POST['invoiceid'];
/*
$query2 = "UPDATE osdate_transactions SET payment_email='".$payemail."', payment_status='".$payment_status."',
           payment_vars='".$subscription_id."' WHERE invoice_no='".$invoiceid."'";
		   
mysql_query($query2);		   

mysql_close($connect);

*/
}
else {
echo $reasonForDecline = $_POST['reasonForDecline'];
/*$query3 = "UPDATE osdate_transactions SET payment_email='".$payemail."', payment_status='".$reasonForDecline."' WHERE invoice_no='".$invoiceid."'";
mysql_query($query2);		   

mysql_close($connect);
*/
}
}
else {
echo "You cannot access this file directly!";
}

?>